<style>
</style>
<template>
    <ly-page>
        <ly-navi title="消息框"></ly-navi>
        <ly-page-content>

            <div style="margin-bottom: 20px; color: #3793FF;">消息框 Alert</div>
            <div>
                <el-button @click="showMessageBox()">默认</el-button>
                <el-button @click="showMessageBox('info')">info</el-button>
                <el-button @click="showMessageBox('success')">success</el-button>
                <el-button @click="showMessageBox('warning')">warning</el-button>
                <el-button @click="showMessageBox('error')">error</el-button>
            </div>
            <div style="height: 20px"></div>
            <div style="margin-bottom: 20px; color: #3793FF;">消息框 confirm</div>
            <div>
                <el-button @click="showMessageConfirm()">默认</el-button>
                <el-button @click="showMessageConfirm('info')">info</el-button>
                <el-button @click="showMessageConfirm('success')">success</el-button>
                <el-button @click="showMessageConfirm('warning')">warning</el-button>
                <el-button @click="showMessageConfirm('error')">error</el-button>
            </div>

            <ly-code-view>
                <pre v-pre>
showMessageBox: function (type) {
    this.$alert('这是一段内容这是一段内容这是一段内容', '标题名称', {
        type: type,
        confirmButtonText: '确定',
        callback: function () {

        }
    });

}, showMessageConfirm: function (type) {
    this.$confirm('这是一段内容这是一段内容这是一段内容', '标题名称', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: type,
        callback: function () {

        }
    }).then(function () {

    }).catch(function () {

    });

                }
                </pre>
            </ly-code-view>

        </ly-page-content>
    </ly-page>
</template>
<script>
    Rap.define("", [], function () {
        return {
            data: function () {
                return {

                }
            },
            mounted: function () {

            },
            methods: {
               showMessageBox: function (type) {
                    this.$alert('这是一段内容这是一段内容这是一段内容', '标题名称', {
                        type: type,
                        confirmButtonText: '确定',
                        callback: function () {

                        }
                    });

                }, showMessageConfirm: function (type) {
                    this.$confirm('这是一段内容这是一段内容这是一段内容', '标题名称', {
                        confirmButtonText: '确定',
                        cancelButtonText: '取消',
                        type: type,
                        callback: function () {

                        }
                    }).then(function () {

                    }).catch(function () {

                    });

                }


            }
        }
    })
</script>